package com.webserver.http;

import java.util.HashMap;
import java.util.Map;

public class HttpContext {
    public static final char CR=13;//回车符
    public static final char LF=10;//换行符
    private static Map<String,String> mimeMapping=new HashMap<>();
    static {
        //初始化所有静态属性:静态块
        initMimeMapping();
    }
    private static void initMimeMapping(){
        mimeMapping.put("html","text/html");
        mimeMapping.put("css","text/css");
        mimeMapping.put("js","application/javascript");
        mimeMapping.put("png ","image/png");
        mimeMapping.put("gif","image/gif");
        mimeMapping.put("gif","image/gif");
    }
    public static String getMimeType(String ext){
        return mimeMapping.get(ext);
    }
}
